package thursday;

import java.util.Scanner;

public class BankTest {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        Bank[] accounts = new Bank[2];

        for(int i=0;i<accounts.length;i++){
            Bank account = new Bank();
            System.out.println("第"+(i+1) + "位客户");
            System.out.println("设置密码: ");
            account.setPasswd(sc.next());

            System.out.println("初始存款余额: ");
            account.setSavings(sc.nextDouble());

            accounts[i]=account;
        }
        System.out.println("客户信息列表:");
        for (int i = 0; i < accounts.length; i++) {
            System.out.println("账号: " + accounts[i].getAccount() +
                    ", 密码: " + accounts[i].getPasswd() +
                    ", 存款余额: " + accounts[i].getSavings() +
                    ", 利率: " + Bank.getRate() +
                    ", 最小余额: " + Bank.getMini());
        }
        sc.close();

    }
}
